<template>
  <div class="sidebar">
    <el-card class="sidebar-card">
      <h3>个人信息</h3>
      <p>用户名：张三</p>
      <p>积分：1200</p>
    </el-card>

    <el-card class="sidebar-card">
      <h3>空间信息</h3>
      <p>名称：编程爱好者</p>
      <p>成员数：256</p>
    </el-card>

    <el-card class="sidebar-card">
      <h3>热帖推荐</h3>
      <ul>
        <li v-for="hot in hotPosts" :key="hot.id">
          <a href="javascript:void(0)">{{ hot.title }}</a>
        </li>
      </ul>
    </el-card>
  </div>
</template>

<script>
export default {
  props: {
    hotPosts: Array,
  },
};
</script>

<style scoped>
.sidebar {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-card {
  padding: 15px;
}
</style>
